﻿using System;
using Microsoft.EntityFrameworkCore;
using System.Linq;
using MySql.Data.MySqlClient;
using WallpaperCrawler;

namespace WallpaperDemo.Models
{
    public class WallpapersContext : DbContext
    {
        public WallpapersContext(DbContextOptions<WallpapersContext> options)
        : base(options)
        {
            this.Database.EnsureCreated(); 
        }


        public virtual DbSet<Wallpaper> Wallpapers { get; set; }
        public virtual DbSet<User> Users { get; set; }
        public virtual DbSet<Tag> Tags { get; set; }
        public virtual DbSet<Like> Likes { get; set; }
    }
}